import request from '@/utils/request';

export function getGroupList() {
    return request({
        url: '/group-chat/list',
        method: 'get'
    });
}

export function addGroup(data) {
    return request({
        url: '/group-chat/add',
        method: 'post',
        data
    });
}

export function deleteGroup(data) {
    return request({
        url: '/group-chat/delete',
        method: 'post',
        data
    });
}

export function getGroupMessages(data) {
    return request({
        url: '/group-chat/messages',
        method: 'get',
        params: data
    });
}

export function sendGroupMessage(data) {
    return request({
        url: '/group-chat/send-message',
        method: 'post',
        data
    });
}